package com.anycl.design.structural.adapter.delegation;

/**
 * 委托方式
 */
public class Adapter extends Target {

    private Adaptee adaptee;

    public Adapter() {
        this.adaptee = new Adaptee();
    }

    public void targetMethod1() {
        System.out.println("Adapter targetMethod1 invoked");
        adaptee.methodA();
    }

    public void targetMethod2() {
        System.out.println("Adapter targetMethod2 invoked");
        adaptee.methodB();
    }
}
